<template>
  <div class="pub-picture">
    <ellipsis text="" />
    <div class="card-grid">
      <div v-for="(item, index) in 6" :key="index">
        <van-image :src="url" />
      </div>
    </div>
    <div class="pub-flex-centerY opear-footer pub-font-12 pub-color-96">
      <span class="pub-flex-centerY">
        <van-image width="13px" height="12px" :src="require('@/assets/image/color-14-13.png')" class="pub-icon" />
        99</span
      >
      <span class="pub-flex-centerY">
        <van-image width="13px" height="12px" :src="require('@/assets/image/message-14-13.png')" class="pub-icon" />
        99</span
      >
      <span class="pub-flex-centerY">
        <van-image width="13px" height="12px" :src="require('@/assets/image/forwarding-14-13.png')" class="pub-icon" />
        分享
      </span>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue'
import Ellipsis from './ellipsis.vue'
export default {
  name:'TopicCard',
  setup() {
    const url = ref('https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png')
    return {
      url
    }
  },
  components: {
    Ellipsis
  }
}
</script>

<style scoped lang='scss'>
@import '../style.scss';

.pub-picture {
  .card-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
    &::after {
      display: block;
      width: calc(33.33% - 6px);
      content: '';
      border: none;
    }
    & > div {
      background: gray;
      width: calc(33.33% - 6px);
      margin-bottom: 9px;
    }

    ::v-deep .van-image {
      vertical-align: baseline;
      vertical-align: -webkit-baseline-middle;
      vertical-align: -moz-middle-with-baseline;
    }
  }
  ::v-deep .van-grid-item__content {
    padding-top: initial;
  }

  .opear-footer {
    justify-content: space-between;
  }

  .pub-icon {
    margin-right: 4px;
  }
}
</style>